/*
 * Copyright (c) 2025 Oracle and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.helidon.json.schema.spi;

import io.helidon.json.schema.Schema;
import io.helidon.service.registry.Service;

/**
 * Json schema provider related to the specific class.
 * <p>
 * This type is expected to be code generated by Helidon. Instances are queried via service registry,
 * though they can also be provided as Java {@link java.util.ServiceLoader} providers.
 */
@Service.Contract
public interface JsonSchemaProvider {

    /**
     * Class this schema is describing.
     *
     * @return schema class
     */
    Class<?> schemaClass();

    /**
     * The String format of the schema.
     *
     * @return json schema string
     */
    String jsonSchema();

    /**
     * Json schema represented as an object.
     *
     * @return json schema object
     */
    Schema schema();

}
